#!/usr/bin/env python
#    prop_ecd
#    --------
#    Molecule:         C2H4
#    Wave Function:    SCF
#    Test Purpose:     Electronic circular dichroism parameters (ECD)

import os
import sys

sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
from runtest_dalton import Filter, TestRun

test = TestRun(__file__, sys.argv)

f = Filter()

f.add(string = 'Final HF energy',
      rel_tolerance = 1.0e-8)

f.add(from_string = 'Atoms and basis sets',
      num_lines = 15,
      rel_tolerance = 1.0e-2)

f.add(from_string = 'Cartesian Coordinates',
      num_lines = 10,
      rel_tolerance = 1.0e-8)

f.add(string = 'Number of coordinates in each symmetry',
      rel_tolerance = 1.0e-2)
      
f.add(string = 'Number of orbitals in each symmetry',
      rel_tolerance = 1.0e-2)

f.add(from_string = 'Changes of defaults for .EXCITA',
      num_lines = 14,
      rel_tolerance = 1.0e-5)

f.add(from_string = 'Singlet electronic excitation energies',
      num_lines = 25,
      abs_tolerance = 1.0e-4)

f.add(from_string = 'Electric transition dipole moments',
      num_lines = 25,
      ignore_sign = True,
      abs_tolerance = 1.0e-3)

f.add(from_string = 'Magnetic transition dipole moments',
      num_lines = 26,
      ignore_sign = True,
      abs_tolerance = 1.0e-3)

f.add(from_string = 'Oscillator and Scalar Rotational Strengths',
      num_lines = 27,
      abs_tolerance = 1.0e-2)


test.run(['prop_ecd.dal'], ['C2H4_intgrl_sym.mol'], f={'out': f})

sys.exit(test.return_code)
